import idler.badder.Singleton;

public class Test {
    public static void main(String[] args) {
        Singleton singleton1 = Singleton.getSingleton();
        Singleton singleton2 = Singleton.getSingleton();
        System.out.println("懒汉式：" + (singleton1 == singleton2));
        hungry.Singleton singleton3 = hungry.Singleton.getSingleton();
        hungry.Singleton singleton4 = hungry.Singleton.getSingleton();
        System.out.println("饿汉式：" + (singleton3 == singleton4));
        idler.better.Singleton singleton5 = idler.better.Singleton.getSingleton();
        idler.better.Singleton singleton6 = idler.better.Singleton.getSingleton();
        System.out.println("懒汉式：" + (singleton5 == singleton6));
    }
}
